'use strict';

const Controller = require('egg').Controller;

class ResourceController extends Controller {
    //获取菜单
    async getResource() {
        let {ctx,service} = this;
        console.log(ctx.request.role_id);
        let role_id = ctx.request.role_id;
        let resourcelist = await service.resource.getResource(role_id);

        ctx.body = {
            code:1,
            data:resourcelist
        }
    }
}

module.exports = ResourceController;
